This script is useful if the Employee ID, or other string-type value with numeric characters, needs to be "padded" with zeroes. This script will return "00345" for an Employee ID of "345".
var pad;
var trimmed = Event.Value.Trim();
if (trimmed.length < 5) {
Event.Value = trimmed.PadLeft(5, '0');
}
PadLeft() takes two parameters. The first parameter is the total field length. The second parameter is the character to pad with. This same script may be used for the PadRight function.